import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '考试类型id',
    align:"center",
    dataIndex: 'examTypeId_dictText'
   },
   {
    title: '工作类型id',
    align:"center",
    dataIndex: 'workTypeId_dictText'
   },
   {
    title: '工作名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '开始日期',
    align:"center",
    dataIndex: 'beginDate',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '结束日期',
    align:"center",
    dataIndex: 'endDate',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text)
    },
   },
   {
    title: '最大人数',
    align:"center",
    dataIndex: 'maxWorkerCount'
   },
   {
    title: '最小人数',
    align:"center",
    dataIndex: 'minWorkerCount'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '考试类型id',
    field: 'examTypeId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"exam_type"
     },
  },
  {
    label: '工作类型id',
    field: 'workTypeId',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"ems_work_type,name,id"
     },
  },
  {
    label: '工作名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '开始日期',
    field: 'beginDate',
    component: 'DatePicker',
  },
  {
    label: '结束日期',
    field: 'endDate',
    component: 'DatePicker',
  },
  {
    label: '最大人数',
    field: 'maxWorkerCount',
    component: 'InputNumber',
  },
  {
    label: '最小人数',
    field: 'minWorkerCount',
    component: 'InputNumber',
  },
];
